package entity;

/**
 * FollowId entity. @author MyEclipse Persistence Tools
 */

public class FollowId implements java.io.Serializable {

	// Fields

	private Contest contest;
	private Account account;

	// Constructors

	/** default constructor */
	public FollowId() {
	}

	/** full constructor */
	public FollowId(Contest contest, Account account) {
		this.contest = contest;
		this.account = account;
	}

	// Property accessors

	public Contest getContest() {
		return this.contest;
	}

	public void setContest(Contest contest) {
		this.contest = contest;
	}

	public Account getAccount() {
		return this.account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FollowId))
			return false;
		FollowId castOther = (FollowId) other;

		return ((this.getContest() == castOther.getContest()) || (this
				.getContest() != null && castOther.getContest() != null && this
				.getContest().equals(castOther.getContest())))
				&& ((this.getAccount() == castOther.getAccount()) || (this
						.getAccount() != null && castOther.getAccount() != null && this
						.getAccount().equals(castOther.getAccount())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getContest() == null ? 0 : this.getContest().hashCode());
		result = 37 * result
				+ (getAccount() == null ? 0 : this.getAccount().hashCode());
		return result;
	}

}